package company.maestro;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;


public class MainMenuAndroidActivity  extends Activity{
	
	  public void onCreate(Bundle icicle) {
	    	super.onCreate(icicle);
	        setContentView(R.layout.main_menu);
	        Button sessionsButton = (Button)findViewById(R.id.sessions);
	        Button attendanceButton = (Button)findViewById(R.id.attendenace);
	        Button feedsButton = (Button)findViewById(R.id.feeds);
	        Button settingsButton = (Button)findViewById(R.id.settings);
	    
	        
	        sessionsButton.setOnClickListener(new View.OnClickListener() {

				public void onClick(View v) {
					
						Intent intent = new Intent(MainMenuAndroidActivity.this, SessionMenuAndroidActivity.class);
						MainMenuAndroidActivity.this.startActivity(intent);
				
				}
			});
	        
	        
	        attendanceButton.setOnClickListener(new View.OnClickListener() {

				public void onClick(View v) {
					
					Intent intent = new Intent(MainMenuAndroidActivity.this, StudentListActivity.class);
					intent.putExtra(StudentListActivity.LIST_TYPE_KEY, StudentListActivity.ATTENDANCE);
                	intent.putExtra(StudentListActivity.CLASS_ID_KEY, -1);
					MainMenuAndroidActivity.this.startActivity(intent);
				
				}
			});
	        
	        
	        settingsButton.setOnClickListener(new View.OnClickListener() {

				public void onClick(View v) {
					
						Intent intent = new Intent(MainMenuAndroidActivity.this, SettingsActivity.class);
						MainMenuAndroidActivity.this.startActivity(intent);
				
				}
			});
	        
	        
	        feedsButton.setOnClickListener(new View.OnClickListener() {

				public void onClick(View v) {
					
					Intent intent = new Intent(MainMenuAndroidActivity.this, StudentListActivity.class);
					intent.putExtra(StudentListActivity.LIST_TYPE_KEY, StudentListActivity.LIST);
                	intent.putExtra(StudentListActivity.CLASS_ID_KEY, -1);
					MainMenuAndroidActivity.this.startActivity(intent);
				
				}
			});
	        
	  }
}
